package com.dxy.dxyadmin.exception;

import com.dxy.dxyadmin.enums.ResultEnum;

/**
 * junfeng 2018/11/6
 */
public class AdminException extends RuntimeException {

    private Integer code;

    public AdminException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public AdminException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }
}
